End.
转
centos7 更新php版本
centos7 默认PHP5.4,版本太低,很多要求至少PHP5.5
1、查看已经安装的PHP组件
yum list installed| grep php
php.x86_64 5.4.-.el7 @base
php-cli.x86_64 5.4.-.el7 @base
php-common.x86_64 5.4.-.el7 @base
2、卸载原有PHP组件
yum remove php.x86_64 php-cli.x86_64 php-common.x86_64
3、安装新源
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
4、安装PHP5.5
yum install php55w.x86_64 php55w-cli.x86_64 php55w-common.x86_64 php55w-gd.x86_64 php55w-ldap.x86_64 php55w-mbstring.x86_64 php55w-mcrypt.x86_64 php55w-mysql.x86_64 php55w-pdo.x86_64
5、查看版本
php -v
PHP 5.5. (cli) (built: Jul ::)
Copyright (c) - The PHP Group
Zend Engine v2.5.0, Copyright (c) - Zend Technologies
End.